<template>
  <div>
    <table border="1">
      <tr v-for="(i,index) in showlist">
        <td :class="{on:index%2==0}">{{i.bookname}}</td>
      </tr>
    </table>
  </div>
</template>

<script>
  export default {
    data(){
      return{
        showlist:[]
      }
    },mounted() {
      this.axios.get('http://localhost:8000/show/').then(
        res=>{
          this.showlist=res.data
        }
      )
    }
  }
</script>

<style scoped>
.on{
  background: #3B91FF;
}
</style>
